import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import Home from "../views/Home/index.vue";
import About from "../views/About/index.vue";
import PointEchart from "@/components/Echart/comp/PointEchart/index.vue";
import LineEchart from "@/components/Echart/comp/LineEchart/index.vue";
import PolygonEchart from "@/components/Echart/comp/PolygonEchart/index.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "home",
    component: Home,
  },
  {
    path: "/about",
    name: "about",
    component: About,
  },
  {
    path: "/point",
    name: "point",
    component: PointEchart,
  },
  {
    path: "/line",
    name: "line",
    component: LineEchart,
  },
  {
    path: "/polygon",
    name: "polygon",
    component: PolygonEchart,
  },
];

console.log("routes", routes);

const router = createRouter({
  history: createWebHistory(import.meta.env.VITE_BASE_URL),
  routes,
});

export default router;
